summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2024-01-27 20:39:55 +0100
committerLiam <byteslice@airmail.cc>2024-01-30 02:17:33 +0100
commit8e0a40434c8cc1de7b7262c0439380e5eca3e42a (patch)
tree8c4c431ce094cc55b13bcfd917f5dd27e25dd754
parentcore: support offline web applet (diff)
downloadyuzu-8e0a40434c8cc1de7b7262c0439380e5eca3e42a.tar
yuzu-8e0a40434c8cc1de7b7262c0439380e5eca3e42a.tar.gz
yuzu-8e0a40434c8cc1de7b7262c0439380e5eca3e42a.tar.bz2
yuzu-8e0a40434c8cc1de7b7262c0439380e5eca3e42a.tar.lz
yuzu-8e0a40434c8cc1de7b7262c0439380e5eca3e42a.tar.xz
yuzu-8e0a40434c8cc1de7b7262c0439380e5eca3e42a.tar.zst
yuzu-8e0a40434c8cc1de7b7262c0439380e5eca3e42a.zip
-rw-r--r--src/core/hle/service/am/applet_manager.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/hle/service/am/applet_manager.cpp b/src/core/hle/service/am/applet_manager.cpp
index a733525a2..52200d5b2 100644
--- a/src/core/hle/service/am/applet_manager.cpp
+++ b/src/core/hle/service/am/applet_manager.cpp
@@ -221,6 +221,7 @@ void AppletManager::InsertApplet(std::shared_ptr<Applet> applet) {
void AppletManager::TerminateAndRemoveApplet(AppletResourceUserId aruid) {
std::shared_ptr<Applet> applet;
+ bool should_stop = false;
{
std::scoped_lock lk{m_lock};
@@ -231,10 +232,17 @@ void AppletManager::TerminateAndRemoveApplet(AppletResourceUserId aruid) {
applet = it->second;
m_applets.erase(it);
+
+ should_stop = m_applets.empty();
}
// Terminate process.
applet->process->Terminate();
+
+ // If there were no applets left, stop emulation.
+ if (should_stop) {
+ m_system.Exit();
+ }
}
void AppletManager::CreateAndInsertByFrontendAppletParameters(